package cn.lstf666.springboot.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@Controller
public class Mycontroller {

    @RequestMapping("/sss")
    public  Object getStudent(HttpServletRequest request){
        Map smap = new HashMap();
        smap.put("id",request.getParameter("id"));
        smap.put("name","zhangsan");
        request.getSession().setAttribute("smap",smap);
        return "user";
    }
}
